package com.dao;

import java.util.List;

import com.po.PageBean;
import com.po.PageList;

/**
 * @author FengJianBo
 * 2014骞�鏈�8鏃�涓婂崍11:44:14
 */

public interface BaseDao<T> {
	/**
	 * 娣诲姞
	 * @author FengJianBo
	 * @param t
	 * @throws Exception
	 * 2014骞�鏈�8鏃�涓婂崍11:48:02
	 */
	public void add(T t) throws Exception;
	/**
	 * 淇敼
	 * @author FengJianBo
	 * @param t
	 * @throws Exception
	 * 2014骞�鏈�8鏃�涓婂崍11:48:07
	 */
	public void update(T t) throws Exception;
	/**
	 * 鎸夌収瀵硅薄鍒犻櫎
	 * @author FengJianBo
	 * @param t
	 * @throws Exception
	 * 2014骞�鏈�8鏃�涓婂崍11:48:16
	 */
	public void delete(T t) throws Exception;
	/**
	 * 鎸夌収id鍒犻櫎
	 * @author FengJianBo
	 * @param id
	 * @throws Exception
	 * 2014骞�鏈�8鏃�涓婂崍11:48:26
	 */
	public void deleteById(java.io.Serializable id) throws Exception;
	/**
	 * 鏌ヨ鎵�湁
	 * @author FengJianBo
	 * @throws Exception
	 * 2014骞�鏈�8鏃�涓婂崍11:48:35
	 */
	public List<T> findAll() throws Exception;
	/**
	 * 鏌ヨ鎵�湁
	 * @author FengJianBo
	 * @throws Exception
	 * 2014骞�鏈�8鏃�涓婂崍11:48:35
	 */
	public PageList<T> findAll(PageBean pageBean) throws Exception;
	/**
	 * 鎸夌収id鏌ヨ
	 * @author FengJianBo
	 * @param id
	 * @throws Exception
	 * 2014骞�鏈�8鏃�涓婂崍11:48:41
	 */
	public T findById(java.io.Serializable id) throws Exception;
	/**
	 * 浠ュ璞′綔涓烘煡璇㈡潯浠惰繘琛屾煡璇�
	 * @author FengJianBo
	 * @param entity 浣滀负鏉′欢鐨勫璞�
	 * @return
	 * 2014骞�鏈�1鏃�涓嬪崍4:50:14
	 */
	public T findForObject(final T entity);
	/**
	 * 浠ュ璞′綔涓烘煡璇㈡潯浠惰繘琛屾煡璇�
	 * @author FengJianBo
	 * @param entity 浣滀负鏉′欢鐨勭粨鏋滈泦
	 * @param pageBean 鍒嗛〉淇℃伅瀵硅薄
	 * @return
	 * 2014骞�鏈�1鏃�涓嬪崍2:08:09
	 */
	public PageList<T> findForList(final T entity, final PageBean pageBean);
	
}
